<template>
  <div class="shop_doctor">
    <div class="avatar">
      <nuxt-link :to="`/doctor/${info.id}`">
        <li-image :src="info.logo" class="img" v-if="info.logo" />
        <img src="@/assets/images/home/goods.png" class="img" alt="" v-else />
      </nuxt-link>
      <img src="@/assets/images/home/rz.png" class="rz" alt="" />
    </div>
    <div class="info_box">
      <div class="top">
        <div class="title">
          <nuxt-link :to="`/doctor/${info.id}`"
            ><span class="name">{{ info.name }}</span></nuxt-link
          >
          <span>{{ info.personalTitle }}</span>
        </div>
        <div class="desc">
          {{ info.introduce }}
        </div>
      </div>
      <div class="bottom">
        <span class="orange">{{ $fomartRate(info.initScore) }}分</span>
        <span>/</span>
        <span>预约人数</span>
        <span class="num">{{ info.initAppointmentCnt }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "ShopDoctor",
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
    size: {
      type: String, // small
      default: "",
    },
  },
  data() {
    return {};
  },
  methods: {
    // 查看详情
    lookDetail() {
      let o = this.info;
      let query = this.$route.query;
      query.id = o.id;
      this.$router.push({
        path: `/doctor/${o.id}`,
        //query: { ...query },
      });
      // this.$router.push({
      //   path: "/doctor/detail",
      //   query: { ...query },
      // });
    },
  },
};
</script>
<style lang="less" scoped>
@import "./shopDoctor.less";
</style>